package com.zjj.concurrent.thread;

/**
 * @author zhanglei.zjj
 * @description 使用Thread类或继承Thread类创建线程
 * @date 2023/5/14 21:49
 */
public class TestThreadUseThreadClass {
    public static void main(String[] args) {
        Thread thread = new Thread() {
            @Override
            public void run() {
                System.out.println("线程任务开始执行-thread type a");
            }
        };
        ThreadTask threadTask = new ThreadTask();
        threadTask.start();
    }

    static class ThreadTask extends Thread {
        @Override
        public void run() {
            System.out.println("线程任务开始执行-thread type b");
        }
    }
}
